﻿<%@ Page Language="C#" MasterPageFile="~/Administrator/Admin.master" AutoEventWireup="true"
    Inherits="Administrator_AdminVideos" Title="Quản trị Video" CodeBehind="AdminVideos.aspx.cs" %>

<%@ Register Src="~/Administrator/Controls/PaggingControl.ascx" TagName="PaggingControl"
    TagPrefix="EHT" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <h1>
        <asp:Label ID="lbAdminVideos" runat="server" Text="Video"></asp:Label>
    </h1>
    <p class="submitButton">
        <asp:Button ID="btnAdd" runat="server" Text="Thêm mới Video" OnClick="btnAdd_Click"
            CssClass="btn_action" />
    </p>
    <asp:Repeater ID="rpVideos" runat="server" OnItemCommand="rpVideos_ItemCommand">
        <HeaderTemplate>
            <table cellspacing="0" cellpadding="0" class="data-table">
                <thead>
                    <tr>
                        <th class="actions delete">
                            STT
                        </th>
                        <th class="actions edit">
                            Sửa
                        </th>
                        <th class="actions delete">
                            Xóa
                        </th>
                        <th>
                            Mô tả VN
                        </th>
                        <th class="OtherLanguage">
                            Mô tả Other
                        </th>
                        <th>
                            Video url
                        </th>
                        <th class="number_of_order">
                            Thứ tự
                            <asp:ImageButton ID="ibtnSaveAll" ImageUrl="Templates/Images/save_all.jpg" Height="20"
                                Width="20" OnClientClick="return confirm('Bạn muốn lưu ?');" runat="server" BorderStyle="None"
                                CommandName="save_all" />
                        </th>
                        <th class="publish">
                            Hiển thị
                        </th>
                    </tr>
                </thead>
                <tbody>
        </HeaderTemplate>
        <ItemTemplate>
            <tr>
                <td>
                    <%#Eval("IndexId")%>
                </td>
                <td class="actions edit">
                    <a href='AdminVideoIU.aspx?VideoID=<%#Eval("VideoID")%>'>
                        <img alt="Edit" src="Templates/Images/Edit.png" style="border: none;"></a>
                    <asp:Literal ID="ltrVideoID" runat="server" Visible="false" Text='<%#Eval("VideoID")%>'></asp:Literal>
                </td>
                <td class="actions delete">
                    <asp:ImageButton ID="ibtn" ImageUrl="Templates/Images/Delete.png" OnClientClick="return confirm('Bạn muốn xóa Video ?');"
                        runat="server" CommandName="delete1" CommandArgument='<%#Eval("VideoID") %>'
                        BorderStyle="None" />
                </td>
                <th>
                    <%#Eval("MoTaVN") %>
                </th>
                <th class="OtherLanguage">
                    <%#Eval("MoTaOther") %>
                </th>
                <td>
                    <%#Eval("VideoUrl") %>
                </td>
                <td>
                    <asp:TextBox ID="txtNumberOfOrder" Width="30" runat="server" Text='<%#Eval("NumberOfOrder")%>'></asp:TextBox>
                    <asp:ImageButton Width="16" Height="16" ID="btnSaveNumberOfOrder" CommandName="change_number_of_order"
                        CommandArgument='<%#Eval("VideoID") %>' ImageUrl="Templates/Images/save.jpg"
                        runat="server" />
                </td>
                <td>
                    <asp:CheckBox ID="ckPublish" runat="server" Checked='<%#Eval("Publish")%>' Visible="false" />
                    <asp:ImageButton Width="16" Height="16" ID="btnPublish" CommandName="publish" CommandArgument='<%#Eval("VideoID") %>'
                        ImageUrl="Templates/Images/btncheck.png" runat="server" />
                </td>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
            </tbody> </table>
        </FooterTemplate>
    </asp:Repeater>
    <p>
        <EHT:PaggingControl ID="PaggingControl1" runat="server" PageURL="AdminVideos.aspx"
            PageSize="10" />
    </p>
</asp:Content>
